<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" th:href="@{/mdui/css/mdui.min.css}">
    <title>云舒NAS</title>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body class="mdui-drawer-body-left mdui-appbar-with-toolbar mdui-theme-primary-indigo mdui-theme-accent-pink">
<header th:replace="common :: header"></header>
<nav th:replace="common :: nav"></nav>
<section class="mdui-container-fluid">
    <iframe id="myiframe" width="100%" height="170" src="/webui-aria2/index.html" frameborder="no" border="0"
            marginwidth="0" marginheight="0" scrolling="auto"></iframe>
</section>
<script th:src="@{/mdui/js/mdui.min.js}"></script>
<script th:inline="javascript">
    'use strict';
    const $$ = mdui.JQ;
    const ifm = document.getElementById("myiframe");

    function changeFrameHeight() {
        let height = document.getElementById("left-drawer").clientHeight - 5;
        ifm.style.height = height + 'px';
        ifm.height = document.documentElement.clientHeight;
    }

    window.onresize = function () {
        changeFrameHeight();
    };

    $$(function () {
        changeFrameHeight();
    })
</script>
</body>
</html>
